<?php
global $pager_total_items, $pager_page_array, $pager_limits;
$total_items = 0;
if($pager_total_items[0]) {
  $total_items = $pager_total_items[0];
}
$page = $pager_page_array[0];
$limit = $pager_limits[0];
$total_page = @ceil($total_items / $limit);

$keyword = get_search_keyword();
?>

<main id="content" role="main">
  <div class="container clearfix">
    <div class="par parsys">
      <div class="searchresults">
        <div class="mod mod-search-result skin-search-result-web">
          <div class="results-tips">为您找到和关键词<b> <?= $keyword ?> </b>有关的结果约<b> <?= $total_items ?> </b>个</div>
          <div class="js-results">
            <?php foreach ($variables[NULL]['#results'] as $row):?>
            <article>
              <h3><a target="_blank" href="<?= $row['link'] ?>"><?= $row['title'] ?></a></h3>
              <p class="rich"><?= $row['snippet'] ?></p>
            </article>
            <?php endforeach; ?>
          </div>
          <div class="footer clearfix">
            <div class="pagination clearfix">
            <?= theme('pager')?>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</main>
